package com.ftwj.demo.generate.entity;

import java.io.Serializable;

/**
 * 
*
* <p>Title: Configuration</p>  
* <p>Description: 配置文件对象</p>
* <p>Copyright: Copyright (c) 2020 </p>  
* <p>Company: 兰州飞天网景信息产业有限公司</p>    
* @author WangSLi
* @date 2020年3月5日 上午12:25:59
* @version V1.0
 */
public class Configuration implements Serializable {
	
    /** serialVersionUID*/ 
	private static final long serialVersionUID = 1L;
	
	private String author; //作者
	private String company;
    private String packageName; //根包名
    private String[] perfix; //表前缀
    private String path; //保存路径
    private File file; //模板文件
    private Database database; //数据库配置
    
    public Configuration() {
    	
    }
    
    public Configuration(String author, String packageName, File file, String path, Database database) {
		this.author = author;
		this.packageName = packageName;
		this.file = file;
		this.path = path;
		this.database = database;
	}

	public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getPackageName() {
        return packageName == null ? "" : packageName + ".";
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String[] getPerfix() {
		return perfix;
	}

	public void setPerfix(String[] perfix) {
		this.perfix = perfix;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Database getDatabase() {
		return database;
	}

	public void setDatabase(Database database) {
		this.database = database;
	}


	public static class Database {
        private String url;
        private String username;
        private String password;

        public Database() {
        	
        }

        public Database(String url, String username, String password) {
            this.url = url;
            this.username = username;
            this.password = password;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }
    }

    public static class File {
    	private String html;
    	private String javascript;
        private String controller;
        private String interfac;
		private String service;
        private String dao;
        private String mapper;
        private String entity;

        public File() {
        	
        }

		public File(String html, String javascript, String controller, String interfac, String service, String dao,
				String mapper, String entity) {
			this.html = html;
			this.javascript = javascript;
			this.controller = controller;
			this.interfac = interfac;
			this.service = service;
			this.dao = dao;
			this.mapper = mapper;
			this.entity = entity;
		}

		public String getHtml() {
			return html == null ? "" : html;
		}

		public void setHtml(String html) {
			this.html = html;
		}

		public String getJavascript() {
			return javascript == null ? "" : javascript;
		}

		public void setJavascript(String javascript) {
			this.javascript = javascript;
		}

		public String getController() {
			return controller == null ? "" : controller;
		}

		public void setController(String controller) {
			this.controller = controller;
		}

		public String getInterfac() {
			return interfac == null ? "" : interfac;
		}

		public void setInterfac(String interfac) {
			this.interfac = interfac;
		}

		public String getService() {
			return service == null ? "" : service;
		}

		public void setService(String service) {
			this.service = service;
		}

		public String getDao() {
			return dao == null ? "" : dao;
		}

		public void setDao(String dao) {
			this.dao = dao;
		}

		public String getMapper() {
			return mapper == null ? "" : mapper;
		}

		public void setMapper(String mapper) {
			this.mapper = mapper;
		}

		public String getEntity() {
			return entity == null ? "" : entity;
		}

		public void setEntity(String entity) {
			this.entity = entity;
		}

    }

}
